﻿<%@ Control Language="C#" EnableViewState="true" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>

<script type="text/javascript">
    function select_project1(userType) {
        var url = 'GetCompanyList2.aspx?userType=' + escape(userType) + "&id=" + document.getElementById('project_id').value + "&rd=" + Math.random();
        var feature = "dialogWidth:" + 500 + "px;dialogHeight:" + 450 + "px;scroll: yes; status: no; help: no; center: 1";

        var project_info = window.showModalDialog(url, '', feature);
        if (project_info != undefined && project_info.length > 1) {  
            var returnval=project_info;
            var returnvalue=returnval.split(',');
            document.getElementById("project_id").value="";
            document.getElementById('Text1').value="";
            document.getElementById('Text2').value="";
            document.getElementById('<%=txt征收评估机构.ClientID %>').value="";
            document.getElementById('project_id').value =returnval;
            for(var i=0;i<returnvalue.length;i++){
            var temp=returnvalue[i];
            var tempone=temp.replace("|",",").split(',');
            document.getElementById('Text1').value+=tempone[0]+",";
            document.getElementById('Text2').value+=tempone[1]+",";
            document.getElementById('<%=txt征收评估机构.ClientID %>').value = 
            document.getElementById('Text2').value.substring(0,document.getElementById('Text2').value.length-1);
            }       
        }
    }
    function select_project2(id) {
        var userType = "已通过征收评估机构";
        var url = 'GetCompanyList2.aspx?userType=' + escape(userType) + "&id=" + id + "&rd=" + Math.random();
        var feature = "dialogWidth:" + 500 + "px;dialogHeight:" + 450 + "px;scroll: yes; status: no; help: no; center: 1";

        var project_info = window.showModalDialog(url, '', feature);
        if (project_info != undefined && project_info.length > 1) {
            var returnval = project_info;
            var returnvalue = returnval.split(',');
            document.getElementById("project_id").value = "";
            document.getElementById('Text1').value = "";
            document.getElementById('Text2').value = "";
            document.getElementById('<%=txt已通过征收评估机构.ClientID %>').value = "";
            document.getElementById('project_id').value = returnval;
            for (var i = 0; i < returnvalue.length; i++) {
                var temp = returnvalue[i];
                var tempone = temp.replace("|", ",").split(',');
                document.getElementById('Text1').value += tempone[0] + ",";
                document.getElementById('Text2').value += tempone[1] + ",";
                document.getElementById('<%=txt已通过征收评估机构.ClientID %>').value =
            document.getElementById('Text2').value.substring(0, document.getElementById('Text2').value.length - 1);
            }
        }
    }
    
    function OpenFileUpload(cqid,cid,pid) {
        window.open('../ZSManage/FileUpload1.aspx?usetype=8&pid='+pid+'&cid='+cid+'&cqid=' + cqid, '文件上传', 'height=600px,width=800px;toolbar =no,menubar=no, scrollbars=yes, resizable=no, location=no, status=yes');
    }
</script>

<table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-image: url(<%= Antu.Core.Components.SiteSettings.DefaultSiteSettings.DefaultThemeFolderMapPath %>images/menuthb.png);
    margin-top: 1px">
    <tr>
        <td valign="middle" height="30">
            <font id="Font1" style="font-size: 14px; font-weight: bold; color: #3E7CC3; float: left;
                color: black; text-indent: 1em;" runat="server">选择征收评估机构 </font>
        </td>
    </tr>
</table>
<center>
    <table style='width: 100%;' class="window_tab_list" cellpadding="0" cellspacing="0"
        border="1">
        <tr>
            <th colspan="4" style="text-align: center; line-height: 20px;">
                选择征收评估机构
            </th>
        </tr>
        <tr style='height: 15.0pt'>
            <td>
                项目名称：
            </td>
            <td>
                <asp:Label ID="lbl项目名称" runat="server" Text=""></asp:Label>
            </td>
            <td>
                征收范围：
            </td>
            <td>
                <asp:Label ID="lbl征收范围" runat="server" Text=""></asp:Label>
            </td>
        </tr>

        <tr style="height:15.0pt">
            <td>
                已报名评估机构
            </td>
            <td align="left" colspan="3">
                <asp:TextBox id="txt_ybm" Height="140" Width="100%" runat="server" 
                    TextMode="MultiLine" ></asp:TextBox>
            </td>
        </tr>
        <tr style='height: 15.0pt'>
            <td>
                有资格的评估机构：
            </td>
            <td colspan="3">
                <asp:TextBox ID="txt征收评估机构" runat="server" TextMode="MultiLine" Width="100%" Height="140px" ></asp:TextBox>
            </td>
          <%--  <td align="left">
                &nbsp;&nbsp;<input id="btn_yzg" type="button" value="选择" onclick="select_project1('评估机构')" class="button" />
                &nbsp;&nbsp;<asp:Button ID="btnRNull" runat="server" Text="清空"
                    OnClientClick="return confirm('确认将已选择的评估机构进行清空吗？')" />
            </td>--%>
        </tr>
                <tr style='height: 15.0pt'>
            <td >
                选择征收评估机构方式：
            </td>
            <td  colspan="3" align="left">
                <%
                     EluZSProvider.EluZSDataProvider _EluZSDataProvider = (EluZSProvider.EluZSDataProvider)Antu.Core.Services.ProviderService.ProviderServiceMange.GetProvider("EluZSProvider");
                    string sql = "Select * from zs_project where id = '" + Page.Request["pnid"] + "'";
                    System.Data.DataTable dt = _EluZSDataProvider.GetTable(sql);
                    if (dt.Rows.Count>0)
                    {
                        if (dt.Rows[0]["是否抽签"].ToString() == "1")
                        {
                            %>
                              <asp:DropDownList ID="ddl选择评估机构" runat="server">
                              <asp:ListItem Text="抽签" Value="抽签"></asp:ListItem>
                              </asp:DropDownList>
                              
                                抽签地点
                                    <asp:TextBox id="txt抽签地点" Width="300" runat="server" 
                                     ></asp:TextBox>
                            <%
                        }
                        else
                        {
                            %>
                            
                             <asp:DropDownList ID="DropDownList1" runat="server">
                             <asp:ListItem Text="共同选定" Value="共同选定"></asp:ListItem>
                             <asp:ListItem Text="多数选定" Value="多数选定"></asp:ListItem>
                             </asp:DropDownList>
                            <%
                        }
                       
                    }
                     %>
              
                &nbsp;&nbsp;&nbsp;&nbsp;时间：<CBW:MPCalendar ID="txt抽签时间" runat="server" />
                              </td>
                                
                              <td colspan="1">
                              
                              </td>
                <asp:Button  ID="btn_sq" Visible="false" Text="申请" runat="server" />
        
        </tr>
          <tr style='height: 15.0pt'>
            <td>
                已确定征收评估机构：
            </td>
            <td colspan="2">
                <asp:TextBox ID="txt已通过征收评估机构" runat="server" TextMode="MultiLine" Width="100%" Height="30px" onfocus="this.blur()"></asp:TextBox>
            </td>
            <td align="left">
                &nbsp;&nbsp;<asp:Button ID="btn_xz" runat="server" Text="选择" />
                &nbsp;&nbsp;<asp:Button ID="Button2" runat="server" Text="清空"
                    OnClientClick="return confirm('确认将已通过的评估机构进行清空吗？')" />
                    <%
                     sql = "Select * from zs_project where id = '" + Page.Request["pnid"] + "'";
                     dt = _EluZSDataProvider.GetTable(sql);
                    if (dt.Rows.Count > 0)
                    {
                        if (dt.Rows[0]["是否抽签"].ToString() == "1")
                        {
                            %> 
                     &nbsp;&nbsp;<asp:Button ID="btn_printGG" runat="server" Text="打印公告" />
                        <%
                        }

                    }
                    %>
            </td>
        </tr>
        <tr>
            <td colspan="4">
                <asp:Button ID="btnUpload" runat="server" Text="附件上传" />&nbsp;&nbsp;
                <asp:Button ID="BtnSave" runat="server" Text="保存" />&nbsp;&nbsp;
                <input id="Button1" type="button" value="返回" onclick="javascript:window.location.href=('ZS_PGJG.aspx');" />
            </td>
        </tr>
    </table>
    <div style="display: none;">
        <input type="text" value="" id="project_id" />
        <input type="text" value="" id="Text1" />
        <input type="text" value="" id="Text2" />
    </div>
</center>
